<?php
class index_model extends CI_Model
{
    protected $_table="mock_categories";
    public function __construct()
    {
        parent::__construct();

    }
    //show list cate
    public function list_cate(){
        return $this->db->get($this->_table)->result_array();
    }
    public function list_cate_parent()
    {
        $this->db->where('cate_parent =',0);
        return $this->db->get($this->_table)->result_array();
    }
    public function list_cate_child(){
        $this->db->where('cate_parent !=',0);
        return $this->db->get($this->_table)->result_array();
    }
}
